package com.tiantai.tea.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tiantai.tea.mapper.TeaHomestayMapper;
import com.tiantai.tea.domain.TeaHomestay;
import com.tiantai.tea.service.ITeaHomestayService;

/**
 * 茶民宿管理Service业务层处理
 * 
 * @author handsomedog
 * @date 2024-09-28
 */
@Service
public class TeaHomestayServiceImpl implements ITeaHomestayService 
{
    @Autowired
    private TeaHomestayMapper teaHomestayMapper;

    /**
     * 查询茶民宿管理
     * 
     * @param id 茶民宿管理主键
     * @return 茶民宿管理
     */
    @Override
    public TeaHomestay selectTeaHomestayById(Long id)
    {
        return teaHomestayMapper.selectTeaHomestayById(id);
    }

    /**
     * 查询茶民宿管理列表
     * 
     * @param teaHomestay 茶民宿管理
     * @return 茶民宿管理
     */
    @Override
    public List<TeaHomestay> selectTeaHomestayList(TeaHomestay teaHomestay)
    {
        return teaHomestayMapper.selectTeaHomestayList(teaHomestay);
    }

    /**
     * 新增茶民宿管理
     * 
     * @param teaHomestay 茶民宿管理
     * @return 结果
     */
    @Override
    public int insertTeaHomestay(TeaHomestay teaHomestay)
    {
        return teaHomestayMapper.insertTeaHomestay(teaHomestay);
    }

    /**
     * 修改茶民宿管理
     * 
     * @param teaHomestay 茶民宿管理
     * @return 结果
     */
    @Override
    public int updateTeaHomestay(TeaHomestay teaHomestay)
    {
        return teaHomestayMapper.updateTeaHomestay(teaHomestay);
    }

    /**
     * 批量删除茶民宿管理
     * 
     * @param ids 需要删除的茶民宿管理主键
     * @return 结果
     */
    @Override
    public int deleteTeaHomestayByIds(Long[] ids)
    {
        return teaHomestayMapper.deleteTeaHomestayByIds(ids);
    }

    /**
     * 删除茶民宿管理信息
     * 
     * @param id 茶民宿管理主键
     * @return 结果
     */
    @Override
    public int deleteTeaHomestayById(Long id)
    {
        return teaHomestayMapper.deleteTeaHomestayById(id);
    }
}
